      
 <script type="text/javascript">
<!--
  $(function(){
  	sy.admin.menu${(OP.TMenu.id)!}.save = function(obj) {
  		if($("#menu${(OP.TMenu.id)!}Form").valid()){
  			$.ajax({
				type: "POST", 
				url: "op_save_${(OP.TMenu.id)!}.action",
				data: $('#menu${(OP.TMenu.id)!}Form').serializeArray(),
				dataType: "json",
				success: function(data){
					if(data.success) {
						sy.closeWindow();
						//$('#admin_menu${(OP.TMenu.id)!}_datagrid').bootstrapTable('refresh');
						sy.reloadDiv('op_list_${(OP.TMenu.id)!}.action');
					}
					sy.toastrsAlert({
		       		     code: data.success ? 'success' :'error',
		       		     msg: data.success ? '成功' :'失败'
		       		});
				}
			});
  		}
		 
	}
  	
  	sy.admin.menu${(OP.TMenu.id)!}.imgs = function (){
  		sy.showWindow({
			title:'使用规则',
			type:2,
			href:'http://www.zi-han.net/theme/hplus/fontawesome.html?v=4.0#contao',
			width:'800px',
			height:'600px',
			okhandler:function(){
				sy.closeWindow();
			},
			cancelhandler:function(){
				sy.closeWindow();
			}
		});
  	}
  	
  });

//-->
</script>
       <div class="wrapper wrapper-content gray-bg bgg animated  ${(cfg.animated)!}    "   style="height:100%" >
                <div class="ibox">
                    <div class="ibox-content">
                    <form class="form-horizontal m-t required-validate" id="menu${(OP.TMenu.id)!}Form"  action="op_save_${(OP.TMenu.id)!}.${(cfg.suffix)!'action'}"  method="post">
                    <input type="hidden" name="id" value="${(dto.id)!}"/>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">菜单名称：</label>
                                <div class="col-sm-8">
                                   <input  name="name" class="form-control" value="${(dto.name)!}" validate="{required:true,messages:{required:'请填写菜单名称'}}" type="text">
                                    <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span> -->
                                </div>
                            </div>
                               <#include "../inc.html"/>
                             <div class="form-group">
                                <label class="col-sm-3 control-label">上级菜单：</label>
                                 <div class="col-sm-8">
                                       <select class="form-control m-b" name="TMenu.id">
                                        <option value= "">请选择上级菜单</option>
                                        <@my.list id="d" sql="select * from t_sys_menu a where 1=1 order by a.scort " >
										<option value="${d['id']}" <#if d['id'] == (dto.TMenu.id)!0> selected</#if>>
											<#list 0..(d['nlevel']!0) as a>－</#list>＋ ${d['name']}
										</option>
										</@my.list>
                                       </select>
                                </div> 
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">图标：</label>
                                <div class="col-sm-8">
                                    <input name="img" class="form-control" type="text"  value="${(dto.img)!}" validate="{required:true,messages:{required:'请填写img'}}"  >
                                     <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> <a href="javascript:;" onClick="sy.admin.menu${(OP.TMenu.id)!}.imgs();">点我查看使用规则</a></span> 
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">目录：</label>
                                <div class="col-sm-8">
                                    <input name="channel" class="form-control" type="text"  value="${(dto.channel)!}" validate="{required:true,messages:{required:'请填写目录'}}"  >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">参数：</label>
                                <div class="col-sm-8">
                                    <input name="param" class="form-control" type="text"  value="${(dto.param)!}"   >
                                </div>
                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-3 control-label">排序：</label>
	                                <div class="col-sm-8">
	                                    <input name="ordno" class="form-control" type="text"  value="${(dto.ordno)!}"   >
	                                </div>
	                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">状态：</label>
                                <div class="col-sm-8">
                                     <div class="radio i-checks    radio-inline">
                                        <label>
                                            <input type="radio" value="true" <#if ((dto.state)!true)==true> checked</#if> name="state"> <i></i> 启动</label>
                                    </div>
                                    <div class="radio i-checks    radio-inline">
                                        <label>
                                            <input type="radio"  <#if ((dto.state)!true)==false> checked</#if>  value="false" name="state"> <i></i>禁用</label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-8">
                                       <textarea id="ccomment" name="remark" cols="55" rows="3" class="form-control" >${(dto.remark?html)!}</textarea>
                                </div>
                            </div>
                            
                               
                        </form>
                        
                    </div>
                </div>
                </div>
